package com.njbw.train.member;

import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.core.env.ConfigurableEnvironment;

@Slf4j
@SpringBootApplication
@ComponentScan("com.njbw")
@MapperScan("com.njbw.train.member.mapper")
public class TrainMemberApplication {

    public static void main(String[] args) {
        // 新增启动日志
        SpringApplication app = new SpringApplication(TrainMemberApplication.class);
        ConfigurableEnvironment env = app.run(args).getEnvironment();
        log.info("启动成功！");
        log.info("地址：\thttp://127.0.0.1:{}{}",
                env.getProperty("server.port"),
                env.getProperty("server.servlet.context-path"));
    }

}
